package shiyan6;

public class YiXinZhi02 extends Thread {

    private static final int ITERATIONS = 10;
    private long sleepMillis = 50L;

    public YiXinZhi02() {
    }

    public YiXinZhi02(long sleepMillis) {
        this.sleepMillis = sleepMillis;
    }

    public void setSleepMillis(long sleepMillis) {
        this.sleepMillis = sleepMillis;
    }

    @Override
    public void run() {
        for (int i = 0; i < ITERATIONS; i++) {
            System.out.println("我的学号是 202411671429");
            try {
                Thread.sleep(sleepMillis);
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                System.err.println("YiXinZhi02 线程被中断：" + e.getMessage());
                break;
            }
        }
    }
}
